
import request from './request';

export default {
    changePWD(data) {
        return request({
            url: '/administrative_divisions/updatePassword',
            method: 'post',
            data: data
        });
    },
    getcaptcha() {
        return request({
            url: '/captcha/get',
            method: 'get'
        });
    },
    login(data) {
        return request({
            url: '/login/login',
            method: 'post',
            data: data
        });
    },
    getDivisionList(data) {
        return request({
            url: '/administrative_divisions/getList',
            method: 'post',
            data: data
        });
    },
    resetDivisionPWD(code) {
        return request({
            url: `/administrative_divisions/restartPassword/${code}`,
            method: 'get'
        });
    },
    addDivision(data) {
        return request({
            url: '/administrative_divisions/add',
            method: 'post',
            data: data
        });
    },
    updateDivision(data) {
        return request({
            url: '/administrative_divisions/updateInfo',
            method: 'post',
            data: data
        });
    },
    delDivision(code) {
        return request({
            url: `/administrative_divisions/delete/${code}`,
            method: 'get'
        });
    },
    RKnumber(query) {
        return request({
            url: '/rkgis/getProvinceYear',
            method: 'get',
            params: query
        });
    },
    SRKnumber(query) {
        return request({
            url: '/rkgis/getCityResidentYear',
            method: 'get',
            params: query
        });
    },
    HisYearRkData(query) {
        return request({
            url: '/rkgis/getProvinceHistoricalYear',
            method: 'get',
            params: query
        });
    },
    HisYearGDPData(query) {
        return request({
            url: '/rkgis/getProvinceHistoricalGDPYear',
            method: 'get',
            params: query
        });
    },
    getyearlist() {
        return request({
            url: '/labor_force/getYearList',
            method: 'get'
        });
    },
    getWorkManTemp() {
        return request({
            url: '/labor_force/getTemplate',
            method: 'get'
        });
    },
    getWorkManlist(data) {
        return request({
            url: '/labor_force/getPage',
            method: 'post',
            data: data
        });
    },
    upWorkManFile(data) {
        return request({
            url: '/labor_force/importData',
            method: 'post',
            headers: {
                'Content-Type': 'multipart/form-data'
            },
            data
        });
    },
    popGetYear() {
        return request({
            url: '/population_data/getYearList',
            method: 'get'
        });
    },
    popGetData(data) {
        return request({
            url: '/population_data/getPage',
            method: 'post',
            data: data
        });
    },
    uppopFile(data) {
        return request({
            url: '/population_data/importData',
            method: 'post',
            headers: {
                'Content-Type': 'multipart/form-data'
            },
            data
        });
    },
    GDPGetYear() {
        return request({
            url: '/gdp/getYearList',
            method: 'get',
        });
    },
    GDPGetData(data) {
        return request({
            url: '/gdp/getPage',
            method: 'post',
            data: data
        });
    },
    upGDPFile(data) {
        return request({
            url: '/gdp/importData',
            method: 'post',
            headers: {
                'Content-Type': 'multipart/form-data'
            },
            data
        });
    },
    getAreaList(data) {
        return request({
            url: '/administrative_divisions/getList',
            method: 'post',
            data: data
        })
    },
    updateAreaInfo(data) {
        return request({
            url: '/administrative_divisions/updateInfo',
            method: 'post',
            data: data
        })
    },
    addAreaInfo(data) {
        return request({
            url: '/administrative_divisions/add',
            method: 'post',
            data: data
        })
    },
    delAreaInfo(code) {
        return request({
            url: `/administrative_divisions/delete/${code}`,
            method:'get'
        })
    },
    resetPWD(code) {
        return request({
            url: `/administrative_divisions/restartPassword/${code}`,
            method:'get '
        })
    },
    getGeomData(data) {
        return request({
            url: '/rkgis/getGeomData',
            method: 'get',
            params:data
        })
    },
    getTransList(data) {
        return request({
            url: '/ad_transfer_apply/getlist',
            method: 'post',
            data: data
        })
    },
    agreeTrans(id) {
        return request({
            url: `/ad_transfer_apply/receive/${id}`,
            method:'get'
        })
    },
    rejectTrans(id) {
        return request({
            url: `/ad_transfer_apply/refuse/${id}`,
            method:'get'
        })
    },
    backoutTrans(id) {
        return request({
            url: `/ad_transfer_apply/revoke/${id}`,
            method:'get'
        })
    },
    getQHlist(code) {
        return request({
            url: '/ad_transfer_apply/getChildList',
            method: 'get',
            params:code
        })
    },
    TranserQH(data) {
        return request({
            url: '/ad_transfer_apply/apply',
            method: 'post',
            data: data
        })
    },
    updCode() {
        return request({
            url: '/administrative_divisions/remake',
            method:'get'
        })
    },
    getBackupList(data) {
        return request({
            url: '/administrative_divisions/back/getPage',
            method: 'post',
            data: data
        })
    },
    breakBackup(id) {
        return request({
            url: `/administrative_divisions/back/interrupt/${id}`,
            method:'get'
        })
    },
    updateRKdata(obj){
        return request({
            url:'/population_data/update',
            method:'post',
            data:obj
        })
    },
    updateGDPdata(obj){
        return request({
            url:'/gdp/update',
            method:'post',
            data:obj
        })
    },
    getDivisionInfo(){
        return request({
            url:'/administrative_divisions/getCompleteInfo',
            method:'get'
        })
    },
    getCount(){
        return request({
            url:'/RequestCount/getCount',
            method:'get'
        })
    },
    getLoginLog(data){
        return request({
            url:'/LoginLog/getPage',
            method:'post',
            data:data
        })
    },
    delLoginLog(data){
        return request({
            url:'/LoginLog/delete',
            method:'post',
            params:{
                type:data
            }
        })
    },
    delGDPdata(year){
        return request({
            url:`/gdp/delete/${year}`,
            method:'get'
        })
    },
    delRkdata(year){
        return request({
            url:`/population_data/delete/${year}`,
            method:'get'
        })
    }
};
